<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page session="true"%>
<!DOCTYPE html>

<html>
<head>
    <jsp:include page="./util/configurationPage.jsp"/>
    <title>Strona logowania</title>
    <style>
        .input-group-lg > .form-control, .input-group-lg > .input-group-addon,
        .input-group-lg > .input-group-btn > .btn {
            height: 49px;
        }
        .bg-success {background-color: lightblue ;}
        .jumbotron {
            background-color: lightslategrey;
        }
        h2 {
        	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
        	font-size: 40px;
        	font-style: normal;
        	font-variant: normal;
        	font-weight: 500;
        	color: lightgray;
        	text-shadow: 2px 2px cadetblue;
        }
    </style>
</head>
<body class="bg-body" onload='document.loginForm.username.focus();'>
    <jsp:include page="./util/navbar/loginBar.jsp"/>
    <br>
    <div class="container">
        <div class="col-lg-12">
            <div class="row">
                <div class="jumbotron col-lg-offset-3 col-lg-6">
                    <h2 class="text-center"><strong>Logowanie</strong></h2>
                    <hr>
                    <c:if test="${not empty error}">
                        <div class="alert alert-danger text-center" role="alert">${error}</div>
                    </c:if>
                    <c:if test="${not empty msg}">
                        <div class="alert alert-success text-center" role="alert">${msg}</div>
                    </c:if>


                    <form class="form-inline form-group" name='loginForm' action="<c:url value='/login'/>" method='POST'>
                        <div class="input-group input-group-lg col-lg-12">
                            <span class="input-group-addon ">Login: </span>
                            <input type="text" name="username" name class="form-control" placeholder="Podaj login">
                        </div>
                        <br>
                        <div class="input-group input-group-lg col-lg-12">
                            <span class="input-group-addon ">Hasło: </span>
                            <input type="password" name="password" class="form-control" placeholder="Podaj hasło">
                        </div>
                        <hr>
                        <div class="input-group input-group-lg col-lg-12 text-center">
                            <input class="btn btn-success btn-lg" type="submit" value="Zaloguj" />
                        </div>


                        <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
                    </form>
                </div>
	        </div>
	    </div>
	</div>
    <jsp:include page="./util/footer.jsp"/>
</body>
</html>